{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[{\"quan_surplus\": 2360, \"goods_sn\": \"537799635647\", \"quan_status\": 2, \"quan_receive\": \"640\", \"fetchStatus\": 1}]\n",
      "{\"result\":\"请求成功！\",\"code\":\"1000\",\"data\":null,\"subData\":null,\"pageInfo\":null}\n"
     ]
    }
   ],
   "source": [
    "import requests\n",
    "import json\n",
    "\n",
    "data = {\n",
    "        \"quan_surplus\": 2360, \n",
    "        \"goods_sn\": \"537799635647\", \n",
    "        \"quan_status\": 2, \n",
    "        \"quan_receive\": \"640\", \n",
    "        \"fetchStatus\": 1\n",
    "    }\n",
    "data = json.dumps([data])\n",
    "print data\n",
    "data = {'quanInfoJson': data}\n",
    "url = \"http://192.168.10.103:80/chuangxApi/public/api.php/api/Crawler/updateQuanInfoCrawler\"\n",
    "r = requests.post(url, data=data)\n",
    "print r.content"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
